Skip to main content
Quang Liem
💬
0 discussions

Api Service


Api service is a service that provides api to get the data that Gcalls provides to customers

I. Functionality


  • Implementing api to provide data

II. Packages

1. Dependencies

  • Await-to-js - Async await wrapper for easy error handling without try-catch Await-to-js
  • Axios - Promise based HTTP client for the browser and node.js Axios
  • Babel-core - Babel compiler core Babel-core
  • Babel-plugin-transform-object-rest-spread - Compile object rest and spread to ES5 Babel-plugin-transform-object-rest-spread
  • Babel-polyfill - Provides polyfills necessary for a full ES2015+ environment Babel-polyfill
  • Babel-preset-env - A Babel preset for each environment Babel-preset-env
  • Babel-register - Register Babel require hook Babel-register
  • Body-parser - Node.js body parsing middleware Body-parser
  • Cors - Node.js CORS middleware Cors
  • Dotenv - Loads environment variables from .env file Dotenv
  • Ejs - Embedded JavaScript templates Ejs
  • Express-session - Simple session middleware for Express Express-session
  • Express - Fast, unopinionated, minimalist web framework for node Express
  • Jsonfile - Easily read/write JSON files Jsonfile
  • Jsonwebtoken - JSON Web Token implementation (symmetric and asymmetric) Jsonwebtoken
  • Mkdirp - Recursively mkdir, like mkdir -p Mkdirp
  • Mongodb - The official MongoDB driver for Node.js Mongodb
  • Morgan - HTTP request logger middleware for node.js Morgan
  • Serve-favicon - Node.js middleware for serving a favicon Serve-favicon
  • Uuid - RFC4122 (v1, v4, and v5) UUIDs Uuid
  • Winston-daily-rotate-file - A transport for winston which logs to a rotating file each day Winston-daily-rotate-file
  • Winston - A logger for just about everything. Winston

2. Dev dependencies

  • Nodemon - Simple monitor script for use during development of a node.js app. Nodemon

III. Database

1. ERD

2. Database schema

endpoint

FieldTypeDescription
_idstringname endpoint
blacklistarray
descriptionstringdescription endpoint
hardLimitnumber
sortLimitnumber
whiteliststring

key

FieldTypeDescription
_idstring
emailstring
descriptionstringdescription key
rolenumber
domainnumberId callcenter
idUserstringid user use key

IV. Source tree

.
├── app.js
├── .babelrc
├── config
│ ├── access.js
│ ├── admin.js
│ ├── host.js
│ ├── jwt.js
│ ├── logger.js
│ ├── mapper.json
│ ├── mongodb.js
│ └── port.js
├── Dockerfile
├── .dockerignore
├── .env
├── favicon.ico
├── .gitignore
├── .gitlab-ci.yml
├── index.js
├── lib
│ ├── access.js
│ ├── middleware.js
│ ├── runner.js
│ └── validator.js
├── model
│ ├── endpoint.js
│ └── key.js
├── package.json
├── package-lock.json
├── route
│ ├── endpoint.js
│ ├── index.js
│ ├── key.js
│ ├── runner.js
│ └── v1
│ ├── index.js
│ └── runner.js
├── ../static
│ ├── bootstrap-3.3.7-dist
│ │ ├── css
│ │ │ ├── bootstrap.css
│ │ │ ├── bootstrap.css.map
│ │ │ ├── bootstrap.min.css
│ │ │ ├── bootstrap.min.css.map
│ │ │ ├── bootstrap-theme.css
│ │ │ ├── bootstrap-theme.css.map
│ │ │ ├── bootstrap-theme.min.css
│ │ │ └── bootstrap-theme.min.css.map
│ │ ├── fonts
│ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ ├── glyphicons-halflings-regular.svg
│ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ ├── glyphicons-halflings-regular.woff
│ │ │ └── glyphicons-halflings-regular.woff2
│ │ └── js
│ │ ├── bootstrap.js
│ │ ├── bootstrap.min.js
│ │ └── npm.js
│ ├── font-awesome-4.7.0
│ │ ├── css
│ │ │ ├── font-awesome.css
│ │ │ └── font-awesome.min.css
│ │ ├── fonts
│ │ │ ├── FontAwesome.otf
│ │ │ ├── fontawesome-webfont.eot
│ │ │ ├── fontawesome-webfont.svg
│ │ │ ├── fontawesome-webfont.ttf
│ │ │ ├── fontawesome-webfont.woff
│ │ │ └── fontawesome-webfont.woff2
│ │ ├── less
│ │ │ ├── animated.less
│ │ │ ├── bordered-pulled.less
│ │ │ ├── core.less
│ │ │ ├── fixed-width.less
│ │ │ ├── font-awesome.less
│ │ │ ├── icons.less
│ │ │ ├── larger.less
│ │ │ ├── list.less
│ │ │ ├── mixins.less
│ │ │ ├── path.less
│ │ │ ├── rotated-flipped.less
│ │ │ ├── screen-reader.less
│ │ │ ├── stacked.less
│ │ │ └── variables.less
│ │ └── scss
│ │ ├── _animated.scss
│ │ ├── _bordered-pulled.scss
│ │ ├── _core.scss
│ │ ├── _fixed-width.scss
│ │ ├── font-awesome.scss
│ │ ├── _icons.scss
│ │ ├── _larger.scss
│ │ ├── _list.scss
│ │ ├── _mixins.scss
│ │ ├── _path.scss
│ │ ├── _rotated-flipped.scss
│ │ ├── _screen-reader.scss
│ │ ├── _stacked.scss
│ │ └── _variables.scss
│ ├── img
│ │ └── logo.png
│ ├── js
│ │ ├── endpoint.js
│ │ ├── jquery-3.1.1.min.js
│ │ ├── key.js
│ │ ├── sender.js
│ │ └── signin.js
│ └── oneui
│ ├── css
│ │ ├── oneui.min.css
│ │ └── themes
│ │ ├── amethyst.min.css
│ │ ├── city.min.css
│ │ ├── flat.min.css
│ │ ├── modern.min.css
│ │ └── smooth.min.css
│ ├── fonts
│ │ ├── FontAwesome.otf
│ │ ├── fontawesome-webfont.eot
│ │ ├── fontawesome-webfont.svg
│ │ ├── fontawesome-webfont.ttf
│ │ ├── fontawesome-webfont.woff
│ │ ├── fontawesome-webfont.woff2
│ │ ├── glyphicons-halflings-regular.eot
│ │ ├── glyphicons-halflings-regular.svg
│ │ ├── glyphicons-halflings-regular.ttf
│ │ ├── glyphicons-halflings-regular.woff
│ │ ├── glyphicons-halflings-regular.woff2
│ │ ├── Simple-Line-Icons.eot
│ │ ├── Simple-Line-Icons.svg
│ │ ├── Simple-Line-Icons.ttf
│ │ └── Simple-Line-Icons.woff
│ ├── img
│ │ └── favicons
│ │ ├── apple-touch-icon-114x114.png
│ │ ├── apple-touch-icon-120x120.png
│ │ ├── apple-touch-icon-144x144.png
│ │ ├── apple-touch-icon-152x152.png
│ │ ├── apple-touch-icon-180x180.png
│ │ ├── apple-touch-icon-57x57.png
│ │ ├── apple-touch-icon-60x60.png
│ │ ├── apple-touch-icon-72x72.png
│ │ ├── apple-touch-icon-76x76.png
│ │ ├── favicon-160x160.png
│ │ ├── favicon-16x16.png
│ │ ├── favicon-192x192.png
│ │ ├── favicon-32x32.png
│ │ ├── favicon-96x96.png
│ │ └── favicon.png
│ └── js
│ ├── app.js
│ ├── core
│ │ ├── bootstrap.min.js
│ │ ├── jquery.appear.min.js
│ │ ├── jquery.countTo.min.js
│ │ ├── jquery.min.js
│ │ ├── jquery.placeholder.min.js
│ │ ├── jquery.scrollLock.min.js
│ │ ├── jquery.slimscroll.min.js
│ │ └── js.cookie.min.js
│ ├── oneui.min.js
│ └── plugins
│ ├── bootstrap-colorpicker
│ │ ├── bootstrap-colorpicker.min.js
│ │ ├── css
│ │ │ └── bootstrap-colorpicker.min.css
│ │ └── img
│ │ └── bootstrap-colorpicker
│ │ ├── alpha-horizontal.png
│ │ ├── alpha.png
│ │ ├── hue-horizontal.png
│ │ ├── hue.png
│ │ └── saturation.png
│ ├── bootstrap-datepicker
│ │ ├── bootstrap-datepicker3.min.css
│ │ └── bootstrap-datepicker.min.js
│ ├── bootstrap-notify
│ │ └── bootstrap-notify.min.js
│ ├── bootstrap-wizard
│ │ └── jquery.bootstrap.wizard.min.js
│ ├── chartjs
│ │ └── Chart.min.js
│ ├── ckeditor
│ │ ├── adapters
│ │ │ └── jquery.js
│ │ ├── build-config.js
│ │ ├── CHANGES.md
│ │ ├── ckeditor.js
│ │ ├── config.js
│ │ ├── contents.css
│ │ ├── lang
│ │ │ └── en.js
│ │ ├── LICENSE.md
│ │ ├── plugins
│ │ │ ├── a11yhelp
│ │ │ │ └── dialogs
│ │ │ │ ├── a11yhelp.js
│ │ │ │ └── lang
│ │ │ │ ├── af.js
│ │ │ │ ├── ar.js
│ │ │ │ ├── bg.js
│ │ │ │ ├── ca.js
│ │ │ │ ├── cs.js
│ │ │ │ ├── cy.js
│ │ │ │ ├── da.js
│ │ │ │ ├── de.js
│ │ │ │ ├── el.js
│ │ │ │ ├── en-gb.js
│ │ │ │ ├── en.js
│ │ │ │ ├── eo.js
│ │ │ │ ├── es.js
│ │ │ │ ├── et.js
│ │ │ │ ├── fa.js
│ │ │ │ ├── fi.js
│ │ │ │ ├── fr-ca.js
│ │ │ │ ├── fr.js
│ │ │ │ ├── gl.js
│ │ │ │ ├── gu.js
│ │ │ │ ├── he.js
│ │ │ │ ├── hi.js
│ │ │ │ ├── hr.js
│ │ │ │ ├── hu.js
│ │ │ │ ├── id.js
│ │ │ │ ├── it.js
│ │ │ │ ├── ja.js
│ │ │ │ ├── km.js
│ │ │ │ ├── ko.js
│ │ │ │ ├── ku.js
│ │ │ │ ├── lt.js
│ │ │ │ ├── lv.js
│ │ │ │ ├── mk.js
│ │ │ │ ├── mn.js
│ │ │ │ ├── nb.js
│ │ │ │ ├── nl.js
│ │ │ │ ├── no.js
│ │ │ │ ├── pl.js
│ │ │ │ ├── pt-br.js
│ │ │ │ ├── pt.js
│ │ │ │ ├── ro.js
│ │ │ │ ├── ru.js
│ │ │ │ ├── si.js
│ │ │ │ ├── sk.js
│ │ │ │ ├── sl.js
│ │ │ │ ├── sq.js
│ │ │ │ ├── sr.js
│ │ │ │ ├── sr-latn.js
│ │ │ │ ├── sv.js
│ │ │ │ ├── th.js
│ │ │ │ ├── tr.js
│ │ │ │ ├── tt.js
│ │ │ │ ├── ug.js
│ │ │ │ ├── uk.js
│ │ │ │ ├── vi.js
│ │ │ │ ├── zh-cn.js
│ │ │ │ └── zh.js
│ │ │ ├── about
│ │ │ │ └── dialogs
│ │ │ │ ├── about.js
│ │ │ │ ├── hidpi
│ │ │ │ │ └── logo_ckeditor.png
│ │ │ │ └── logo_ckeditor.png
│ │ │ ├── clipboard
│ │ │ │ └── dialogs
│ │ │ │ └── paste.js
│ │ │ ├── colordialog
│ │ │ │ └── dialogs
│ │ │ │ └── colordialog.js
│ │ │ ├── dialog
│ │ │ │ └── dialogDefinition.js
│ │ │ ├── div
│ │ │ │ └── dialogs
│ │ │ │ └── div.js
│ │ │ ├── find
│ │ │ │ └── dialogs
│ │ │ │ └── find.js
│ │ │ ├── flash
│ │ │ │ ├── dialogs
│ │ │ │ │ └── flash.js
│ │ │ │ └── images
│ │ │ │ └── placeholder.png
│ │ │ ├── forms
│ │ │ │ ├── dialogs
│ │ │ │ │ ├── button.js
│ │ │ │ │ ├── checkbox.js
│ │ │ │ │ ├── form.js
│ │ │ │ │ ├── hiddenfield.js
│ │ │ │ │ ├── radio.js
│ │ │ │ │ ├── select.js
│ │ │ │ │ ├── textarea.js
│ │ │ │ │ └── textfield.js
│ │ │ │ └── images
│ │ │ │ └── hiddenfield.gif
│ │ │ ├── icons_hidpi.png
│ │ │ ├── icons.png
│ │ │ ├── iframe
│ │ │ │ ├── dialogs
│ │ │ │ │ └── iframe.js
│ │ │ │ └── images
│ │ │ │ └── placeholder.png
│ │ │ ├── image
│ │ │ │ ├── dialogs
│ │ │ │ │ └── image.js
│ │ │ │ └── images
│ │ │ │ └── noimage.png
│ │ │ ├── link
│ │ │ │ ├── dialogs
│ │ │ │ │ ├── anchor.js
│ │ │ │ │ └── link.js
│ │ │ │ └── images
│ │ │ │ ├── anchor.png
│ │ │ │ └── hidpi
│ │ │ │ └── anchor.png
│ │ │ ├── liststyle
│ │ │ │ └── dialogs
│ │ │ │ └── liststyle.js
│ │ │ ├── magicline
│ │ │ │ └── images
│ │ │ │ ├── hidpi
│ │ │ │ │ ├── icon.png
│ │ │ │ │ └── icon-rtl.png
│ │ │ │ ├── icon.png
│ │ │ │ └── icon-rtl.png
│ │ │ ├── pagebreak
│ │ │ │ └── images
│ │ │ │ └── pagebreak.gif
│ │ │ ├── pastefromword
│ │ │ │ └── filter
│ │ │ │ └── default.js
│ │ │ ├── preview
│ │ │ │ └── preview.html
│ │ │ ├── scayt
│ │ │ │ ├── dialogs
│ │ │ │ │ ├── options.js
│ │ │ │ │ └── toolbar.css
│ │ │ │ ├── LICENSE.md
│ │ │ │ └── README.md
│ │ │ ├── showblocks
│ │ │ │ └── images
│ │ │ │ ├── block_address.png
│ │ │ │ ├── block_blockquote.png
│ │ │ │ ├── block_div.png
│ │ │ │ ├── block_h1.png
│ │ │ │ ├── block_h2.png
│ │ │ │ ├── block_h3.png
│ │ │ │ ├── block_h4.png
│ │ │ │ ├── block_h5.png
│ │ │ │ ├── block_h6.png
│ │ │ │ ├── block_p.png
│ │ │ │ └── block_pre.png
│ │ │ ├── smiley
│ │ │ │ ├── dialogs
│ │ │ │ │ └── smiley.js
│ │ │ │ └── images
│ │ │ │ ├── angel_smile.gif
│ │ │ │ ├── angel_smile.png
│ │ │ │ ├── angry_smile.gif
│ │ │ │ ├── angry_smile.png
│ │ │ │ ├── broken_heart.gif
│ │ │ │ ├── broken_heart.png
│ │ │ │ ├── confused_smile.gif
│ │ │ │ ├── confused_smile.png
│ │ │ │ ├── cry_smile.gif
│ │ │ │ ├── cry_smile.png
│ │ │ │ ├── devil_smile.gif
│ │ │ │ ├── devil_smile.png
│ │ │ │ ├── embaressed_smile.gif
│ │ │ │ ├── embarrassed_smile.gif
│ │ │ │ ├── embarrassed_smile.png
│ │ │ │ ├── envelope.gif
│ │ │ │ ├── envelope.png
│ │ │ │ ├── heart.gif
│ │ │ │ ├── heart.png
│ │ │ │ ├── kiss.gif
│ │ │ │ ├── kiss.png
│ │ │ │ ├── lightbulb.gif
│ │ │ │ ├── lightbulb.png
│ │ │ │ ├── omg_smile.gif
│ │ │ │ ├── omg_smile.png
│ │ │ │ ├── regular_smile.gif
│ │ │ │ ├── regular_smile.png
│ │ │ │ ├── sad_smile.gif
│ │ │ │ ├── sad_smile.png
│ │ │ │ ├── shades_smile.gif
│ │ │ │ ├── shades_smile.png
│ │ │ │ ├── teeth_smile.gif
│ │ │ │ ├── teeth_smile.png
│ │ │ │ ├── thumbs_down.gif
│ │ │ │ ├── thumbs_down.png
│ │ │ │ ├── thumbs_up.gif
│ │ │ │ ├── thumbs_up.png
│ │ │ │ ├── tongue_smile.gif
│ │ │ │ ├── tongue_smile.png
│ │ │ │ ├── tounge_smile.gif
│ │ │ │ ├── whatchutalkingabout_smile.gif
│ │ │ │ ├── whatchutalkingabout_smile.png
│ │ │ │ ├── wink_smile.gif
│ │ │ │ └── wink_smile.png
│ │ │ ├── specialchar
│ │ │ │ └── dialogs
│ │ │ │ ├── lang
│ │ │ │ │ ├── af.js
│ │ │ │ │ ├── ar.js
│ │ │ │ │ ├── bg.js
│ │ │ │ │ ├── ca.js
│ │ │ │ │ ├── cs.js
│ │ │ │ │ ├── cy.js
│ │ │ │ │ ├── da.js
│ │ │ │ │ ├── de.js
│ │ │ │ │ ├── el.js
│ │ │ │ │ ├── en-gb.js
│ │ │ │ │ ├── en.js
│ │ │ │ │ ├── eo.js
│ │ │ │ │ ├── es.js
│ │ │ │ │ ├── et.js
│ │ │ │ │ ├── fa.js
│ │ │ │ │ ├── fi.js
│ │ │ │ │ ├── fr-ca.js
│ │ │ │ │ ├── fr.js
│ │ │ │ │ ├── gl.js
│ │ │ │ │ ├── he.js
│ │ │ │ │ ├── hr.js
│ │ │ │ │ ├── hu.js
│ │ │ │ │ ├── id.js
│ │ │ │ │ ├── it.js
│ │ │ │ │ ├── ja.js
│ │ │ │ │ ├── km.js
│ │ │ │ │ ├── ku.js
│ │ │ │ │ ├── lt.js
│ │ │ │ │ ├── lv.js
│ │ │ │ │ ├── nb.js
│ │ │ │ │ ├── nl.js
│ │ │ │ │ ├── no.js
│ │ │ │ │ ├── pl.js
│ │ │ │ │ ├── pt-br.js
│ │ │ │ │ ├── pt.js
│ │ │ │ │ ├── ru.js
│ │ │ │ │ ├── si.js
│ │ │ │ │ ├── sk.js
│ │ │ │ │ ├── sl.js
│ │ │ │ │ ├── sq.js
│ │ │ │ │ ├── sv.js
│ │ │ │ │ ├── th.js
│ │ │ │ │ ├── tr.js
│ │ │ │ │ ├── tt.js
│ │ │ │ │ ├── ug.js
│ │ │ │ │ ├── uk.js
│ │ │ │ │ ├── vi.js
│ │ │ │ │ ├── zh-cn.js
│ │ │ │ │ └── zh.js
│ │ │ │ └── specialchar.js
│ │ │ ├── table
│ │ │ │ └── dialogs
│ │ │ │ └── table.js
│ │ │ ├── tabletools
│ │ │ │ └── dialogs
│ │ │ │ └── tableCell.js
│ │ │ ├── templates
│ │ │ │ ├── dialogs
│ │ │ │ │ ├── templates.css
│ │ │ │ │ └── templates.js
│ │ │ │ └── templates
│ │ │ │ ├── default.js
│ │ │ │ └── images
│ │ │ │ ├── template1.gif
│ │ │ │ ├── template2.gif
│ │ │ │ └── template3.gif
│ │ │ └── wsc
│ │ │ ├── dialogs
│ │ │ │ ├── ciframe.html
│ │ │ │ ├── tmpFrameset.html
│ │ │ │ ├── wsc.css
│ │ │ │ ├── wsc_ie.js
│ │ │ │ └── wsc.js
│ │ │ ├── LICENSE.md
│ │ │ └── README.md
│ │ ├── README.md
│ │ ├── samples
│ │ │ ├── ajax.html
│ │ │ ├── api.html
│ │ │ ├── appendto.html
│ │ │ ├── assets
│ │ │ │ ├── inlineall
│ │ │ │ │ └── logo.png
│ │ │ │ ├── outputxhtml
│ │ │ │ │ └── outputxhtml.css
│ │ │ │ ├── posteddata.php
│ │ │ │ ├── sample.jpg
│ │ │ │ └── uilanguages
│ │ │ │ └── languages.js
│ │ │ ├── datafiltering.html
│ │ │ ├── divreplace.html
│ │ │ ├── index.html
│ │ │ ├── inlineall.html
│ │ │ ├── inlinebycode.html
│ │ │ ├── inlinetextarea.html
│ │ │ ├── jquery.html
│ │ │ ├── plugins
│ │ │ │ ├── dialog
│ │ │ │ │ ├── assets
│ │ │ │ │ │ └── my_dialog.js
│ │ │ │ │ └── dialog.html
│ │ │ │ ├── enterkey
│ │ │ │ │ └── enterkey.html
│ │ │ │ ├── htmlwriter
│ │ │ │ │ ├── assets
│ │ │ │ │ │ └── outputforflash
│ │ │ │ │ │ ├── outputforflash.fla
│ │ │ │ │ │ ├── outputforflash.swf
│ │ │ │ │ │ └── swfobject.js
│ │ │ │ │ ├── outputforflash.html
│ │ │ │ │ └── outputhtml.html
│ │ │ │ ├── magicline
│ │ │ │ │ └── magicline.html
│ │ │ │ ├── toolbar
│ │ │ │ │ └── toolbar.html
│ │ │ │ └── wysiwygarea
│ │ │ │ └── fullpage.html
│ │ │ ├── readonly.html
│ │ │ ├── replacebyclass.html
│ │ │ ├── replacebycode.html
│ │ │ ├── sample.css
│ │ │ ├── sample.js
│ │ │ ├── sample_posteddata.php
│ │ │ ├── tabindex.html
│ │ │ ├── uicolor.html
│ │ │ ├── uilanguages.html
│ │ │ └── xhtmlstyle.html
│ │ ├── skins
│ │ │ └── bootstrapck
│ │ │ ├── dialog.css
│ │ │ ├── dialog_ie7.css
│ │ │ ├── dialog_ie8.css
│ │ │ ├── dialog_ie.css
│ │ │ ├── dialog_iequirks.css
│ │ │ ├── dialog_opera.css
│ │ │ ├── editor.css
│ │ │ ├── editor_gecko.css
│ │ │ ├── editor_ie7.css
│ │ │ ├── editor_ie8.css
│ │ │ ├── editor_ie.css
│ │ │ ├── editor_iequirks.css
│ │ │ ├── icons_hidpi.png
│ │ │ ├── icons.png
│ │ │ ├── images
│ │ │ │ ├── arrow.png
│ │ │ │ ├── close.png
│ │ │ │ ├── hidpi
│ │ │ │ │ ├── close.png
│ │ │ │ │ ├── lock-open.png
│ │ │ │ │ ├── lock.png
│ │ │ │ │ └── refresh.png
│ │ │ │ ├── lock-open.png
│ │ │ │ ├── lock.png
│ │ │ │ └── refresh.png
│ │ │ ├── readme.md
│ │ │ └── sample
│ │ │ ├── bootstrapck-sample.html
│ │ │ ├── css
│ │ │ │ └── bootstrapck-sample.css
│ │ │ └── js
│ │ │ ├── analytics.js
│ │ │ └── jquery-1.11.0.min.js
│ │ └── styles.js
│ ├── datatables
│ │ ├── jquery.dataTables.min.css
│ │ └── jquery.dataTables.min.js
│ ├── dropzonejs
│ │ ├── dropzone.min.css
│ │ └── dropzone.min.js
│ ├── easy-pie-chart
│ │ └── jquery.easypiechart.min.js
│ ├── flot
│ │ ├── jquery.flot.min.js
│ │ ├── jquery.flot.pie.min.js
│ │ ├── jquery.flot.resize.min.js
│ │ └── jquery.flot.stack.min.js
│ ├── fullcalendar
│ │ ├── fullcalendar.min.css
│ │ ├── fullcalendar.min.js
│ │ ├── gcal.min.js
│ │ └── moment.min.js
│ ├── gmapsjs
│ │ └── gmaps.min.js
│ ├── highlightjs
│ │ ├── github-gist.min.css
│ │ └── highlight.pack.js
│ ├── jquery-countdown
│ │ └── jquery.countdown.min.js
│ ├── jquery-tags-input
│ │ ├── jquery.tagsinput.min.css
│ │ └── jquery.tagsinput.min.js
│ ├── jquery-ui
│ │ └── jquery-ui.min.js
│ ├── jquery-validation
│ │ └── jquery.validate.min.js
│ ├── magnific-popup
│ │ ├── magnific-popup.min.css
│ │ └── magnific-popup.min.js
│ ├── masked-inputs
│ │ └── jquery.maskedinput.min.js
│ ├── select2
│ │ ├── select2-bootstrap.css
│ │ ├── select2.full.min.js
│ │ └── select2.min.css
│ ├── slick
│ │ ├── ajax-loader.gif
│ │ ├── fonts
│ │ │ ├── slick.eot
│ │ │ ├── slick.svg
│ │ │ ├── slick.ttf
│ │ │ └── slick.woff
│ │ ├── slick.min.css
│ │ ├── slick.min.js
│ │ └── slick-theme.min.css
│ ├── sparkline
│ │ └── jquery.sparkline.min.js
│ └── summernote
│ ├── summernote-bs3.min.css
│ ├── summernote.min.css
│ └── summernote.min.js
└── view
├── base
│ ├── header.ejs
│ ├── plugins.ejs
│ └── sidebar.ejs
├── endpoint.ejs
├── key.ejs
├── sender.ejs
└── signin.ejs

V. Installation


  • Clone project:
git clone https://gitlab.com/gcalls-opensource/gcallsmiddle.git
  • Change dir into apiService folder
cd apiService
  • Install utility modules:
npm install
  • Start server:

    • run in development

      npm run dev
    • run in production

        npm install -g pm2
      npm start

VI. Challenge

  • Fix cronjob for daily/ weekly/ monthy report - This cron exports mp3 and calllog to exel then send mail to customer through smtp

VII. Endpoint

Please visit API documentation for more details